<?php 
/*
* 站点首页部分
*/
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
<?php include View::getView('header_show');?>
<div id="middle">
<div id="left">
<?php include View::getView('home_show');?>
<div class="latest_l">
  <div class="latest">
    <div class="header">
      <h1>最近更新</h1>
    </div><!-- #header -->
      <div class="inside">
        <div class="top">
		<?php 
		$Log_Model = new Log_Model();
		$newlogs = $Log_Model->getLogsForHome("ORDER BY `date` DESC", 0, 1);
		foreach($newlogs as $row){
			?>
			<a href="<?php echo $row['log_url']; ?>">
			<img src="<?php logs_thumb($row,'275','130'); ?>" alt="<?php echo $row['log_title']; ?>" />
            </a>
        <div class="heading">
          <h2><a href="<?php echo $row['log_url']; ?>" title="<?php echo $row['log_title']; ?>"><?php echo extractHtmlData($row['log_title'],80); ?></a></h2>
             <span class="date">发表于： <?php echo gmdate('y-m-d', $row['date']);?></span>
                 <div class="pholder">
                  <p><?php echo extractHtmlData($excerpt,75);?></p></div>

        <?php }?>
        </div><!-- #heading -->
        </div><!-- #top -->
      </div><!-- #inside -->
  </div><!-- #latest -->
</div><!-- #latest_l -->

<div class="latest_r">
 <div class="latest">
   <div class="header">
     <h1>特别推荐</h1>
   </div><!-- #header -->
       <div class="inside">
         <div class="top">
           <?php 
		   $Log_Model = new Log_Model();
		   $toplogs = $Log_Model->getLogsForHome("and top='y' ORDER BY `date` DESC", 0, 1);
		   foreach($toplogs as $row){
			   ?>
			   <a href="<?php echo $row['log_url']; ?>">
			   <img src="<?php logs_thumb($row,'275','130'); ?>" alt="<?php echo $row['log_title']; ?>" /></a>
                <div class="heading">
                     <h2><a href="<?php echo $row['log_url']; ?>" title="<?php echo $row['log_title']; ?>"><?php echo extractHtmlData($row['log_title'],80); ?></a></h2>
                      <span class="date">发表于： <?php echo gmdate('y-m-d', $row['date']);?></span>
                       <div class="pholder">
                        <p><?php echo extractHtmlData($excerpt,75);?></p>
					   </div>
			<?php }?>
                </div><!-- #heading -->
         </div><!-- #top -->
       </div><!-- #inside -->
 </div><!-- #latest -->
</div><!-- #latest_r -->
</div><!-- #left-->

<div id="right-x">
<?php include View::getView('tabs');?>
</div><!-- #right-x-->
</div><!-- #middle-->
<?php include View::getView('home_sort');?>